package com.edooteach.tencent.rao;

import java.util.Map;
import com.demo2do.core.entity.result.HttpResult;
import com.demo2do.core.http.HttpMethod;
import com.demo2do.core.http.annotation.Rao;
import com.demo2do.core.http.annotation.RaoBody;
import com.demo2do.core.http.annotation.RaoConfig;
import com.demo2do.core.http.annotation.RaoMapping;
import com.demo2do.core.http.annotation.RaoParam;
/**
 * 
 * @author cuteHU
 *
 */
@Rao
public interface CorpUserRao {
	
	/**
	 * @param accessToken
	 * @param params
	 * @return
	 */
	@RaoConfig(code = "errcode", message = "errmsg", parse = true)
	@RaoMapping(value = "https://qyapi.weixin.qq.com/cgi-bin/user/create", method = HttpMethod.POST)
	public HttpResult createUser(@RaoParam("access_token") String accessToken, @RaoBody Map<String, Object> params);
	
	/**
	 * @param accessToken
	 * @param params
	 * @return
	 */
	@RaoConfig(code = "errcode", message = "errmsg", parse = true)
	@RaoMapping(value = "https://qyapi.weixin.qq.com/cgi-bin/user/delete", method = HttpMethod.GET)
	public HttpResult deleteUser(@RaoParam("access_token") String accessToken, @RaoParam("userid") String userid);
	
	/**
	 * @param accessToken
	 * @param params
	 * @return
	 */
	@RaoConfig(code = "errcode", message = "errmsg", parse = true)
	@RaoMapping(value = "https://qyapi.weixin.qq.com/cgi-bin/user/get", method = HttpMethod.GET)
	public HttpResult loadUser(@RaoParam("access_token") String accessToken, @RaoParam("userid") String userid);
	
	/**
	 * @param accessToken
	 * @param params
	 * @return
	 */
	@RaoConfig(code = "errcode", message = "errmsg", parse = true)
	@RaoMapping(value = "https://qyapi.weixin.qq.com/cgi-bin/user/update", method = HttpMethod.POST)
	public HttpResult updateUser(@RaoParam("access_token") String accessToken, @RaoBody Map<String, Object> params);
		
	/**
	 * @param accessToken
	 * @param params
	 * @return
	 */
	@RaoConfig(code = "errcode", message = "errmsg", parse = true)
	@RaoMapping(value = "https://qyapi.weixin.qq.com/cgi-bin/user/batchdelete", method = HttpMethod.POST)
	public HttpResult batchdeleteUser(@RaoParam("access_token") String accessToken, Map<String, Object> params);
	
	/**
	 * @param accessToken
	 * @param params
	 * @return
	 */
	@RaoConfig(code = "errcode", message = "errmsg", parse = true)
	@RaoMapping(value = "https://qyapi.weixin.qq.com/cgi-bin/user/simplelist", method = HttpMethod.GET)
	public HttpResult simplelistUser(@RaoParam("access_token") String accessToken, @RaoParam("department_id") Integer departmentId);
	
	/**
	 * @param accessToken
	 * @param params
	 * @return
	 */
	@RaoConfig(code = "errcode", message = "errmsg", parse = true)
	@RaoMapping(value = "https://qyapi.weixin.qq.com/cgi-bin/user/list", method = HttpMethod.GET)
	public HttpResult listUser(@RaoParam("access_token") String accessToken, @RaoParam("department_id") Integer departmentId);
		
}
